import numpy as np


def process(x):
    if 3.5 <= x < 13:
        return 1
    elif 13 <= x < 25:
        return 2
    else:
        return 3


ds = np.array([
    [1, 2, 3],
    [4, 5, 6],
    [7, 8, 9],
    [10, 11, 12],
    [15, 16, 17],
    [26, 27, 28]
])
function_vector = np.vectorize(process)
ds_1 = function_vector(ds)
print(ds_1)

